Repository navigation
Conversation
✅ Deploy Preview for ntl-mcp ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for netlify-mcp ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for mcp ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
commit: |
aecb1ad to
f7f7f06
Compare
| if (typeof accessToken !== 'string' || !accessToken || | ||
| !state || typeof state !== 'object' || Array.isArray(state) || | ||
| (state.scope !== undefined && typeof state.scope !== 'string')) { |
There was a problem hiding this comment.
We already use zod in this codebase. Could we kill the as any and as any as CODE_JWE_PAYLOAD above and just use zod for this? We'd get better type safety and DX and this would just work exhaustively.
28c5771 to
d89b2e0
Compare
b186081 to
9fe08e6
Compare
eb610c2 to
6da541c
Compare
6da541c to
ed37422
Compare
ed37422 to
b5ae0f6
Compare
Summary
Submitting an access or refresh token as an authorization code crashed
/oauth-server/tokenwhile reading missing authorization state.The endpoint now returns 400
invalid_grantfor incompatible decrypted payloads.How and why
Validate the token, state and scope before processing the exchange so malformed payloads cannot reach state lookups or scope parsing.
Valid authorization codes continue through the existing client, redirect and PKCE checks.
Testing
On a preview deployment, complete an OAuth flow, then submit its access token as
codewithgrant_type=authorization_code, the sameclient_idandredirect_uri, and acode_verifier.Expect 400
invalid_grant; repeat with the refresh token if the client requestedoffline_access.